<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
      .box{
        width: 100px;
        height: 100px;
        background-color: orange;
      }
    </style>
</head>
<body>
    <div id="app">
        <div class="box" @click="divClick">
          <!-- 阻止冒泡 加上了.stop -->
          <button @click.stop="btnClick">按钮</button>
        </div>
    </div>

    <script src="./lib/Vue.js"></script>
    <script>
        const app = Vue.createApp({
            data() {
                return{
                  message:"Hello Vue"
                }
            },
            methods: {
              btnClick() {
                console.log('btnClick');
              },
              divClick() {
                console.log('divClick');

              }
            }
        })
        app.mount("#app")
    </script>
</body>
</html>